<template>
  <div class="MaintenanceStaff">
    <div class="MaintenanceStaff_top">
      <el-button type="primary">添加维修员工</el-button>
      <el-date-picker
        v-model="value1"
        type="datetimerange"
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
        class="MaintenanceStaff_top_right"
      ></el-date-picker>
    </div>
    <div class="MaintenanceStaff_center">
      <el-form
        :model="ruleForm"
        :rules="rules"
        ref="ruleForm"
        label-width="100px"
        class="demo-ruleForm"
        :inline="true"
      >
        <el-form-item label="员工编号 :" prop="name" class="ruleForm_input">
          <el-select v-model="ruleForm.region" placeholder="请选择活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="员工姓名 :" prop="name" class="ruleForm_input">
          <el-select v-model="ruleForm.region" placeholder="请选择活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="设备型号 :" prop="name" class="ruleForm_input">
          <el-select v-model="ruleForm.region" placeholder="请选择活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="工作状态 :" prop="name">
          <el-select v-model="ruleForm.region" placeholder="请选择活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="在职/离职 :" prop="name">
          <el-select v-model="ruleForm.region" placeholder="请选择活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="星际评价 :" prop="name">
          <el-select v-model="ruleForm.region" placeholder="请选择活动区域">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item>
          <el-button type="primary">确认搜索</el-button>
        </el-form-item>
      </el-form>
    </div>
    <el-table
      :data="tableData"
      style="margin-top:20px;"
      border
      :header-cell-style="{width: '100%', background: '#FAFAFA', color: '#606266', height: '60px'}"
    >
      <el-table-column prop="date" label="序号" width="180"></el-table-column>
      <el-table-column prop="date" label="人员信息" width="480">
        <template>
          <div>
            <ul class="tableUl">
              <li>
                <img src="../../assets/images/zh/ic- 设备编号4 (1).png" alt />
                <span>员工编号:001</span>
              </li>
              <li>
                <img src="../../assets/images/zh/负责人.png" alt />
                <span>员工姓名:张三</span>
              </li>
              <li>
                <img src="../../assets/images/zh/联系方式.png" alt />
                <span>手机号码:123456789</span>
              </li>
              <li>
                <img src="../../assets/images/zh/组 347.png" alt />
                <span>擅长类型:001</span>
              </li>
              <li>
                <img src="../../assets/images/zh/ic- 设备编号4 (1).png" alt />
                <span>擅长型号:RH-361L/RH-362L</span>
              </li>
            </ul>
          </div>
        </template>
      </el-table-column>
      <el-table-column prop="address" label="星级评价"></el-table-column>
      <el-table-column prop="address" label="派单数"></el-table-column>
      <el-table-column prop="address" label="工作时长 (h)"></el-table-column>
      <el-table-column prop="address" label="开启在职/离职"></el-table-column>
      <el-table-column label="操作"   fixed="right">
        <template>
          <div>
            <el-tag type="success">编辑</el-tag>
            <el-tag type="warning">查看</el-tag>
          </div>
        </template>
      </el-table-column>
    </el-table>
    <!-- 分页 -->
    <div class="pagination">
      <el-pagination
        background
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :page-sizes="[10,20, 30, 40,50]"
        :page-size="deviceListQuery.pageSize"
        :current-page="deviceListQuery.pageNumber"
        layout="total, sizes, prev, pager, next, jumper"
        :total="devicetotal"
        class="management_page"
      ></el-pagination>
    </div>
  </div>
</template>
<script>
import aa from "../../assets/images/zh/ic- 设备编号4 (1).png";
export default {
  data() {
    return {
      value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
      ruleForm: {
        region: ""
      },
      tableData: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路"
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路"
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路"
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路"
        }
      ],
      rules: {},
      //   分页
      deviceListQuery: {
        type: 1,
        pageSize: 10,
        pageNumber: 1
      },
      devicetotal: 100
    };
  },
  methods: {
    // 分页
    handleSizeChange(val) {
      this.deviceListQuery.pageSize = val;
    },
    handleCurrentChange(val) {
      this.deviceListQuery.pageNumber = val;
    }
  }
};
</script>
<style lang="less" scoped>
.MaintenanceStaff {
  padding: 20px;
  .MaintenanceStaff_top {
    border: 1px solid #fcfdfd;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 20px;
    .MaintenanceStaff_top_right {
      margin-left: auto;
    }
  }
  .MaintenanceStaff_center {
    border: 1px solid #e4e7ed;
    .demo-ruleForm {
      margin-top: 15px;
      min-width: 1100px;
    }
  }
  .tableUl {
    li {
      img {
        vertical-align: middle;
      }
    }
  }
}
</style>